PyAutoPulse v1.3 — stop --all (recover orphan daemon) - #3
Merged
Conversation
`pyauto-pulse stop` only ever worked via the pidfile, so a daemon whose pidfile was deleted out from under it could not be stopped — `stop` reported "not running" while the process lived on, and a subsequent `live`/`watch` would either be refused or spawn a duplicate. Add `stop --all`: a pgrep-based sweep (matched on the daemon.sh script path) that TERMs every pulse daemon process, escalates to KILL for stragglers, and clears the pidfile — regardless of pidfile state. Plain `stop` now also points the user at `--all` when it finds no pidfile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the
stoprobustness gap noted in v1.2 and hit live during first-runtesting:
pyauto-pulse stopworks only via the pidfile, so a daemon whosepidfile was lost couldn't be stopped —
stopreported "not running" while theprocess lived on, and a later
live/watchwould be refused or spawn aduplicate.
Change
stop --all— pgrep-based sweep (matched on thepulse/daemon.shscriptpath) that TERMs every pulse daemon, escalates to KILL for stragglers, and
clears the pidfile, regardless of pidfile state.
stopwith no pidfile now points the user at--all.Verification
stop→ "not running" + hint;stop --all→"swept 1 daemon process(es)", 1 → 0.
stop --allstops + sweeps cleanly, pidfile gone.Enables a clean
PyAutoPulsetab-launcher alias (bashrc, not in this repo)that uses
stop --allinstead of a manual pkill workaround.